import os
import sys

domain_map = [
                 'government',
                 'slate',
                 'telephone',
                 'travel',
                 'facetoface',
                 'letters',
                 'nineeleven',
                 'oup',
                 'verbatim',
                 'fiction'
]


py_file = sys.argv[1]
for FS in [20, 40, 60, 80, 100]:
    for domain_id in range(1, 11):
        with open(py_file) as fr:
            with open(f"./MME_{domain_map[domain_id-1]}_FS{FS}.py", 'w') as fw:
                codes = fr.read()
                codes = codes.replace("domain_id = 2", f"domain_id = {domain_id}")
                codes = codes.replace("max_data_size=100)", f"max_data_size={FS})")
                fw.write(codes)